package com.yequan.quartz;

import org.quartz.*;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author : Administrator
 * @date : 2020/3/23
 */
public class PrintWordsJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobDetail jobDetail = jobExecutionContext.getJobDetail();
        Trigger trigger = jobExecutionContext.getTrigger();
        JobDataMap jobDataMap = jobDetail.getJobDataMap();
        JobDataMap triggerJobDataMap = trigger.getJobDataMap();
        String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        System.out.println("当前时间: " + time);
    }
}
